package co.baiku.boot.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty("ajavaer.jpush.app-key")
@ConfigurationProperties(prefix = "ajavaer.jpush")
@ComponentScan(basePackages = {"co.baiku.boot.config", "co.baiku.boot.jpush"})
public class JPushConfig {

    private String appKey;
    private String masterSecret;
    /**
     * 模式:true生产模式,false开发模式
     */
    private Boolean apnsProduction;
    private JpushProxyConfig proxy;


    public JPushConfig() {

    }

    public JPushConfig(String appKey, String masterSecret, boolean apnsProduction) {
        this.apnsProduction = apnsProduction;
        this.masterSecret = masterSecret;
        this.appKey = appKey;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getMasterSecret() {
        return masterSecret;
    }

    public void setMasterSecret(String masterSecret) {
        this.masterSecret = masterSecret;
    }

    public boolean isApnsProduction() {
        return apnsProduction;
    }

    public void setApnsProduction(boolean apnsProduction) {
        this.apnsProduction = apnsProduction;
    }

    public Boolean getApnsProduction() {
        return apnsProduction;
    }

    public void setApnsProduction(Boolean apnsProduction) {
        this.apnsProduction = apnsProduction;
    }

    public JpushProxyConfig getProxy() {
        return proxy;
    }

    public void setProxy(JpushProxyConfig proxy) {
        this.proxy = proxy;
    }
}
